import NavCustomBar from '../../components/navCustomBar'
import Utils from '@/utils/index'
import './index.scss'

interface HeaderProps {
  title: string
  isBlod?: boolean
  isLeft?: boolean
  needHome?: boolean
  goback?: any
}

function Header(props: HeaderProps) {
  const { title = '领导信箱' , isLeft = false, needHome = true, goback = '' } = props

  if (Utils.getSystemInfo() === 'weapp') {
    return <></>
  }

  return (
    <NavCustomBar
      mainTitle={title}
      mainTitleBold={!isLeft}
      isTitlePositionLeft={isLeft}
      needMainIcon={needHome}
      onClick={typeof goback === 'function' && goback()}
    />
  )
}
export default Header
